#
# Be sure to run `pod lib lint MKAPI.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html

# 本地测试pod库：pod lib lint --allow-warnings --verbose --use-libraries --skip-import-validation --no-clean
# 推送到私有源：pod repo push 私有源名称 MKAPI.podspec --allow-warnings --verbose
# 推送到官方源：pod trunk push MKAPI.podspec  --allow-warnings --verbose
# pod lib lint --allow-warnings --verbose --no-clean

Pod::Spec.new do |s|
  s.name             = 'MKAPI'
  s.version          = '0.0.5'
  s.summary          = 'iOS上，提供异步任务封装工具，可用于网络请求的封装'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
* 提供异步任务封装工具，可用于网络请求的封装
                       DESC

  s.homepage         = 'https://gitee.com/sushangjin/MKAPI'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'MKAPI/LICENSE' }
  s.author           = { 'sushangjin' => '381130632@qq.com' }
  s.source           = { :git => 'https://gitee.com/sushangjin/MKAPI', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '9.0'

  s.source_files = 'MKAPI/*.h'
  s.frameworks = 'UIKit'
  
  #Core基础
  s.subspec 'Core' do |ss|
    ss.source_files = 'MKAPI/Core/*.{h,m}'
    ss.frameworks = 'UIKit'
  end
  
  #Http
  s.subspec 'Http' do |ss|
    ss.source_files = 'MKAPI/Http/*.{h,m}'
    ss.dependency 'MKAPI/Core'
    ss.frameworks = 'UIKit','Security'
  end
    
  #AFNetworking网络库封装
  s.subspec 'API_AFNetworking' do |ss|
    ss.source_files = 'MKAPI/API_AFNetworking/*.{h,m}'
    ss.dependency 'MKAPI/Core'
    ss.dependency 'MKAPI/Http'
    ss.dependency 'AFNetworking', '~> 4'
    ss.frameworks = 'UIKit'
  end
  
  #ServiceApi
  s.subspec 'ServiceApi' do |ss|
    ss.source_files = 'MKAPI/ServiceApi/*.{h,m}'
    ss.dependency 'MKAPI/Core'
    ss.dependency 'MKAPI/Http'
    ss.frameworks = 'UIKit'
  end
  
  # s.resource_bundles = {
  #   'MKAPI' => ['MKAPI/Assets/*.png']
  # }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
end
